//
//  OosMultimediaFeedParser.m
//  Oos4ios
//
//  Created by Pablo Gonzalez on 4/4/11.
//  Copyright 2011 11870.com. All rights reserved.
//

#import "OosMultimediaFeedParser.h"
#import "OosMultimediaEntryParser.h"
#import "../Atom/Feeds/OosMultimediaFeed.h"
#import "../Atom/Entries/OosMultimediaEntry.h"
#import "../GData/Common/Elements/GDataLink.h"

@implementation OosMultimediaFeedParser

static OosMultimediaFeedParser *instance;

+ (OosMultimediaFeedParser *) instance
{
	if (!instance) {
		instance = [[OosMultimediaFeedParser alloc] init];
	}
	return instance;
}

- (NSArray *) parseFeed:(OosFeed *)feed
{
	OosMultimediaFeed *multimediaFeed = (OosMultimediaFeed *) feed;
	
	NSMutableArray *results = [NSMutableArray array];
	
	for (OosMultimediaEntry *entry in [multimediaFeed entries]) {
		[results addObject: [[OosMultimediaEntryParser instance] parseEntry: entry]];
	}
	return results;
}

@end
